package com.hbuzzs.shiro.filter;

import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author zzs
 */
@ControllerAdvice
@Slf4j
public class MyExceptionHandler {

    @ExceptionHandler
    public String errorHandler(AuthorizationException e) {
        log.error("没有通过权限验证！");
        e.printStackTrace();
        return "my_error";
    }
}
